import localZhCN from './i18n/zh-cn.js'
import localEn from './i18n/en.js'
import MagicTaskInfo from './components/magic-task-info.vue'
import 'virtual:svg-icons-register'
import {
    ConnContextMenu
} from './service/conn-context-menu.js'
import {
    CatalogContextMenu
} from './service/catalog-context-menu.js'
import {SqlBuilder} from './service/sqlHandle'
export default (opt) => {
    const i18n = opt.i18n
    // 添加i18n 国际化信息
    i18n.add('zh-cn', localZhCN)
    i18n.add('en', localEn)
    return {
        // 左侧资源
        resource: {
            conn: {
                //连接图标
                icon: '#dbant-icon-mysql-conn',
                //连接右键返回数据
                contextMenu: function (params) {
                    return new ConnContextMenu(opt, params).getMenus();
                }
            },
            catalog: {
                //连接图标
                //连接右键返回数据
                contextMenu: function (params) {
                    return new CatalogContextMenu(opt, params).getMenus();
                }
            }
        },
        sql: new SqlHandle(),
        //路由信息
        router: [{
            name: "testHome",
            path: "/test/testHome",
            meta: {
                name: "指定的首页"
            },
            component: MagicTaskInfo
        }]
    }
}